home *** CD-ROM | disk | FTP | other *** search
/ Internet 53 / INTERNET53.iso / pc / software / windows / building / coldfusion studio evaluation / data1.cab / CFS_Wizards / CFML / Ldap_LdapView.wml < prev    next >
Encoding:
Text File  |  1998-10-08  |  2.0 KB  |  79 lines

  1. <WIZSET ListContainsDN = 'NO'>
  2. <WIZLOOP index="AttrName" list="$${Attributes}">
  3.     <WIZIF LCase(Trim(AttrName)) EQ 'dn'>
  4.         <WIZSET ListContainsDN = 'YES'>
  5.         <WIZBREAK>
  6.     </WIZIF>
  7. </WIZLOOP>
  8. <WIZIF ListContainsDN EQ 'NO'>
  9.     <WIZSET AttributesWithDN = 'dn,' & Attributes>
  10. <WIZELSE>
  11.     <WIZSET AttributesWithDN = Attributes>
  12. </WIZIF>
  13.  
  14.  
  15. <!--- list of attributes (including DN) to display --->
  16. <CFSET Attributes = "$${AttributesWithDN}">
  17.  
  18.  
  19. <!--- if DN is specified, look directly for the entry --->
  20. <CFIF ParameterExists(dn)>
  21.     <CFSET Start = "#dn#">
  22.     <CFSET Scope = "base">
  23. <!--- ... else look for the first descendant --->
  24. <CFELSE>
  25.     <CFSET Start = "$${Root}">
  26.     <CFSET Scope = "oneLevel">
  27. </CFIF>
  28.  
  29.  
  30. <!--- retrieve the entry --->
  31. <CFLDAP NAME="GetEntry"
  32.         SERVER="$${ServerName}"
  33.         PORT="$${ServerPort}"
  34.         USERNAME="$${Username}"
  35.         PASSWORD="$${Password}"
  36.         ACTION="query"
  37.         START="#Start#"
  38.         SCOPE="#Scope#"
  39.         ATTRIBUTES="#Attributes#"
  40.         TIMEOUT="$${Timeout}"
  41.         MAXROWS="1"
  42. >
  43.  
  44.  
  45. <HTML><HEAD>
  46.     <TITLE>$${ApplicationName} - View Record</TITLE>
  47. </HEAD><BODY bgcolor="ffffff">
  48.  
  49. <FONT size="+1">$${ApplicationName}</FONT> <BR>
  50. <FONT size="+2"><B>View Record</B></FONT>
  51.  
  52. <FORM action="$${SafeApplicationName}_LdapAction.cfm" method="post">
  53.  
  54.     <INPUT type="hidden" name="dn" value="<CFOUTPUT>#GetEntry.dn#</CFOUTPUT>">
  55.  
  56.     <INPUT type="submit" name="btnView_First" value=" << ">
  57.     <INPUT type="submit" name="btnView_Previous" value="  <  ">
  58.     <INPUT type="submit" name="btnView_Next" value="  >  ">
  59.     <INPUT type="submit" name="btnView_Last" value=" >> ">
  60.     <INPUT type="submit" name="btnView_Add" value="   Add    ">
  61.     <INPUT type="submit" name="btnView_Edit" value="  Edit  ">
  62.     <INPUT type="submit" name="btnView_Delete" value="Delete">
  63.  
  64. </FORM>
  65.  
  66. <TABLE>
  67. <!--- display all attributes and their values --->
  68. <CFLOOP index="Attribute" list="#Attributes#">
  69.  
  70.     <CFOUTPUT>
  71.     <TR><TD>#Attribute#:</TD>
  72.         <TD>#Evaluate( 'GetEntry.#Trim(Attribute)#' )#</TD>
  73.     </TR>
  74.     </CFOUTPUT>
  75.  
  76. </CFLOOP>
  77. </TABLE>
  78.  
  79. </BODY></HTML>